<body class="gray-bg">
<div class="ibox-content">
    <form class="form-horizontal" method="post" action="{:url('Archives/add')}">
        <div class="form-group">
            <label class="col-sm-2 control-label">文章标题</label>
            <div class="col-sm-6">
                <input name="title" class="form-control" type="text" placeholder="请输入文章标题" required/>
                <span class="help-block m-b-none"></span>
            </div>
            <label class="col-sm-2 control-label">短标题</label>
            <div class="col-sm-2">
                <input name="shorttitle" class="form-control" type="text" placeholder="请输入文章短标题"/>
            </div>
        </div>
<!--        <div class="form-group">-->
<!--            <label class="col-sm-2 control-label">启用跳转</label>-->
<!--            <div class="col-sm-10">-->
<!--                <div class="input-group m-b">-->
<!--                    <span class="input-group-addon"> <input name="is_jump" type="checkbox" value="1"> </span>-->
<!--                    <input type="text" class="form-control" name="jump_url" value="" placeholder="启用了地址跳转这里必须设置跳转网址">-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->

        <div class="form-group">
            <label class="col-sm-2 control-label">文章属性</label>
            <div class="col-sm-6">
                <p class="form-control-static">{$arcatt_checkbox_html}</p>
                <span class="help-block m-b-none"></span>
            </div>
<!--            <label class="col-sm-2 control-label">所属地区</label>-->
<!--            <div class="col-sm-2">-->
<!--                <select data-placeholder="地区..." name="sys_area_id" class="chosen-select">-->
<!--                    <option value="">请选择地区</option>-->
<!--                    {volist name='sys_area_list' id='vo'}-->
<!--                    <option value="{$vo['id']}">{$vo['name']}</option>-->
<!--                    {/volist}-->
<!--                </select>-->
<!--            </div>-->
        </div>
        <hr>
        <div class="form-group">
            <label class="col-sm-2 control-label">来源</label>
            <div class="col-sm-4">
                <input name="source" class="form-control" type="text" value="原创" placeholder="请输入文章来源"/>
                <span class="help-block m-b-none"></span></div>
            <label class="col-sm-2 control-label">作者</label>
            <div class="col-sm-4">
                <input name="writer" class="form-control" type="text" value="管理员" placeholder="请输入文章作者"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章主栏目</label>
            <div class="col-sm-4 fly-form-select">
                <select data-placeholder="上级栏目..." name="type_id" class="chosen-select chosen-select-typeid">
                    <option value="">请选择栏目</option>
                    {volist name='arctypelist' id='vo'}
                    <option value="{$vo['id']}" {notempty name="type_id" } {if condition="$type_id eq $vo['id'] " } selected="selected" {/if} {/notempty}>{$vo['name']}</option>
                    {/volist}
                </select>
                <span class="help-block m-b-none">文章主栏目必须选择，不能为空</span>
            </div>
            <label class="col-sm-2 control-label">文章副栏目</label>
            <div class="col-sm-4 fly-form-select">
                <select data-placeholder="副级栏目..." name="type_id2" class="chosen-select chosen-select-typeid2">
                    <option value="0">请选择栏目</option>
                    {volist name='arctypelist' id='vo'}
                    <option value="{$vo['id']}">{$vo['name']}</option>
                    {/volist}
                </select>
                <span class="help-block m-b-none">文章副级栏目，可以不选择默认为空或0</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">缩略图标</label>
            <div class="col-sm-8">
                <div id="drop_area"></div>
                {assign name="litpic" value="$info.litpic|default='0'" /}
                {:hook('File', ['name' => 'litpic', 'value' => $litpic, 'type' => 'imgpath'])}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">关键字</label>
            <div class="col-sm-10">
                <input name="keywords" class="form-control" type="text" placeholder="请输入文章关键字" onkeyup="this.value=this.value.replace(/[\，]/g,',');"/>
                <span class="help-block m-b-none">* 用来查找相关文章，可输入多个关键字，中间用英文逗号“,”隔开。不能出现"'&?;:()等字符。</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章描述</label>
            <div class="col-sm-10">
                <textarea name="description" class="form-control"></textarea>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章内容</label>
            <div class="col-sm-10">
                <textarea class="body" name="body"></textarea>
                {:hook('ArticleEditor', ['name' => 'body'])}
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">点击次数</label>
            <div class="col-sm-10">
                <input name="click" class="form-control" value="100" type="text" placeholder="请输入点击次数"/>
                <span class="help-block m-b-none">这功能是提供给管理员作弊用的。不过尽量不要用呀！^_^</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">发布时间</label>
            <div class="col-sm-10">
                <input name="pubdate" class="form-control datetimepicker-now" id="datetimeStart" type="text"
                       placeholder="选择发布时间"/>
                <span class="help-block m-b-none">文档发布时间，默认为当前系统时间</span></div>
        </div>
        {$ext_field}
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                {include file="admin@layout/save_btn"}
            </div>
        </div>
    </form>
</div>

<script>
    $(document).ready(function () {
        $("#datetimeStart").datetimepicker("setDate", new Date());
    });
</script>